package com.briup.pts.config.web;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import org.springdoc.core.models.GroupedOpenApi;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author 25095
 * @description
 * @data 2024/11/22-17:12
 */
@Configuration
public class Knife4jConfig {
    @Bean
    public OpenAPI openAPI(){
        return new OpenAPI()
                .info(new Info()
                        .title("智慧农业溯源系统")
                        .description("智慧农业溯源系统的接口文档")
                        .contact(new Contact()
                                .name("cjz")
                                .email("2509511673@qq.com"))
                        .version("v1.0"));
    }

    @Bean
    public GroupedOpenApi groupedOpenApi(){
        return GroupedOpenApi.builder()
                .group("app-api")
                .packagesToScan("com.briup.pts.web.controller")
                .build();
    }
}
